/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package validate;

import model.Account;
import org.springframework.util.StringUtils;
import org.springframework.validation.Errors;

/**
 *
 * @author tomasz
 */
public class AccountValidate {
    
    
    public void validate(Account account, Errors errors) {
        
		if (!StringUtils.hasLength(account.getContent().getDescription())) {
			errors.rejectValue("content.description", "required", "required");
		}
//                if (!StringUtils.hasLength( String.valueOf( account.getDateStartFirma() ) )) {
//			errors.rejectValue("dateStartFirma", "required", "required");
//		}
               
          
	}
    
}
